package OOday01;

public class CarTest {
    public static void main(String[] args) {
        //访问成员变量
        car bm = new car();
        bm.brand = "宝马";
        bm.color = "白";
        bm.price = 600000;
        bm.capacity = 5;
        //调用方法
        bm.start();
        bm.run();
        bm.stop();

        car add = new car();
        add.brand = "奥迪";
        add.color = "银";
        add.price = 500000;
        add.capacity = 5;
        add.start();
        add.run();
        add.stop();

        //给所有变量赋默认值
        car bc = new car();
        bc.start();
        bc.run();
        bc.stop();





    }
}
